import request from "@/utils/request";

// 分页查询
export const queryPageApi = (data) => request.get("/depts", { params: data});
// 添加
export const addApi = (data) => request.post("/depts", data);
//根据Id查询回显
export const queryByIdApi = (id) => request.get(`/depts/${id}`);
// 修改
export const updateApi = (data) => request.put("/depts", data);
// 删除
export const deleteApi = (id) => request.delete(`/depts/${id}`);
// 查询所有部门
export const queryAllApi = () => request.get("/depts/list");
